<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      var f = (function () {
        var c = "ccc";
        return {
          a: function () {
            return c;
          },
          b: function (d) {
            c = d;
          },
        };
      })();

      console.warn(f.a()); //ccc
      console.warn(f.c); //und
      console.warn(f.b("www")); //und
      console.warn(f.a()); // www
    </script>
  </body>
</html>
